﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using LetiLib.Data;

namespace LedCenter.GUI.PopupControls
{
#if DEBUG
    public partial class TablePopupControl : MiddlePopupControl
#else 
    public partial class TablePopupControl : PopupControl
#endif
    {
        public TablePopupControl()
        {
            InitializeComponent();
        }

        public TablePopupControl(TABLE_POPUP p, bool editMode = false)
            : base((POPUP)p, editMode)
        {
            InitializeComponent();
            busControl1.DataSource = (TABLE_POPUP)_popup;
            busControl1.BusUpdate += new BusControl.BusUpdateHandler(busControl1_BusUpdate);
        }

        void busControl1_BusUpdate()
        {
            _popup = busControl1.DataSource;
            OnPopupUpdated(this);
        }
    }
}
